home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / octa209s.zip / octave-2.09 / liboctave / CmplxQR.h < prev    next >
C/C++ Source or Header  |  1997-03-07  |  2KB  |  79 lines

  1. /*
  2.  
  3. Copyright (C) 1996 John W. Eaton
  4.  
  5. This file is part of Octave.
  6.  
  7. Octave is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as published by the
  9. Free Software Foundation; either version 2, or (at your option) any
  10. later version.
  11.  
  12. Octave is distributed in the hope that it will be useful, but WITHOUT
  13. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15. for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with Octave; see the file COPYING.  If not, write to the Free
  19. Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  
  21. */
  22.  
  23. #if !defined (octave_ComplexQR_h)
  24. #define octave_ComplexQR_h 1
  25.  
  26. #if defined (__GNUG__)
  27. #pragma interface
  28. #endif
  29.  
  30. class ostream;
  31.  
  32. #include "CMatrix.h"
  33. #include "dbleQR.h"
  34.  
  35. class
  36. ComplexQR
  37. {
  38. public:
  39.  
  40.   ComplexQR (void) : q (), r () { }
  41.  
  42.   ComplexQR (const ComplexMatrix&, QR::type = QR::std);
  43.  
  44.   ComplexQR (const ComplexQR& a) : q (a.q), r (a.r) { }
  45.  
  46.   ComplexQR& operator = (const ComplexQR& a)
  47.     {
  48.       if (this != &a)
  49.     {
  50.       q = a.q;
  51.       r = a.r;
  52.     }
  53.       return *this;
  54.     }
  55.  
  56.   ~ComplexQR (void) { }
  57.  
  58.   void init (const ComplexMatrix&, QR::type = QR::std);
  59.  
  60.   ComplexMatrix Q (void) const { return q; }
  61.  
  62.   ComplexMatrix R (void) const { return r; }
  63.  
  64.   friend ostream&  operator << (ostream&, const ComplexQR&);
  65.  
  66. protected:
  67.  
  68.   ComplexMatrix q;
  69.   ComplexMatrix r;
  70. };
  71.  
  72. #endif
  73.  
  74. /*
  75. ;;; Local Variables: ***
  76. ;;; mode: C++ ***
  77. ;;; End: ***
  78. */
  79.